/*****************************************************************
Wowengine - v0.1

File: wen_timer.h
Creation date: 2009-07-08
*****************************************************************/

/****************************************************************/
#ifndef WEN_TIMER_H
#define WEN_TIMER_H
//----------------------------------------------------------------
#include <windows.h>
#include "system/wen_system.h"
/****************************************************************/

namespace wen
{
//----------------------------------------------------------------
class WEN_API Timer
{
/****************************/
// Constructor / Destructor
/****************************/
public:

	Timer();
	~Timer();

/****************************/
// Mediciones
/****************************/
public:

	void FirstMeasure();
	void Measure();

/****************************/
// Accesors
/****************************/
public:

	float GetTimeBetweenFrames() const;
	unsigned int GetFPS() const;

/****************************/
// Propiedades
/****************************/
private:

	double m_dTimeBetweenFrames;
	double m_dMeasureFpsSample;
	unsigned int m_uiFPS;
	unsigned int m_uiFrameCounter;

	LARGE_INTEGER m_kPerfCount1;
	LARGE_INTEGER m_kPerfCount2;
	LARGE_INTEGER m_kFrequency;
};
/****************************************************************/
#include "wen_timer.inl"
/****************************************************************/

//----------------------------------------------------------------
} // end namespace
//----------------------------------------------------------------
#endif // WEN_TIMER_H
//----------------------------------------------------------------